﻿'Author : Ahmad M. Abdan
'Creation Date : 24/07/2012
'Descreption : Procedure of Material Request Page 

Public Class DBVoucherGENERALHdrSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public ID As New TableField("ID", Data.SqlDbType.Int)
    Public Year As New TableField("Year", Data.SqlDbType.Int)
    Public VoucherNo As New TableField("VoucherNo", Data.SqlDbType.NVarChar)
    Public VoucherDate As New TableField("VoucherDate", Data.SqlDbType.DateTime)
    Public VoucherType As New TableField("VoucherType", Data.SqlDbType.Int)
    Public MainCostCenter As New TableField("MainCostCenter", Data.SqlDbType.Int)
    Public CostCenter As New TableField("CostCenter", Data.SqlDbType.Int)
    Public RecordStatus As New TableField("RecordStatus", Data.SqlDbType.Int)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "VoucherGENERALHdrSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal ID As String = "", _
                                 Optional ByVal Year As String = "", _
                                 Optional ByVal VoucherNo As String = "", _
                                 Optional ByVal VoucherDate As String = "", _
                                 Optional ByVal VoucherType As String = "", _
                                 Optional ByVal MainCostCenter As String = "", _
                                 Optional ByVal CostCenter As String = "", _
                                 Optional ByVal RecordStatus As String = "", _
                                 Optional ByVal Remarks As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.ID.SetValue(ID, MyBase.FieldsArrayList)
        Me.Year.SetValue(Year, MyBase.FieldsArrayList)
        Me.VoucherNo.SetValue(VoucherNo, MyBase.FieldsArrayList)
        Me.VoucherDate.SetValue(VoucherDate, MyBase.FieldsArrayList)
        Me.VoucherType.SetValue(VoucherType, MyBase.FieldsArrayList)
        Me.MainCostCenter.SetValue(MainCostCenter, MyBase.FieldsArrayList)
        Me.CostCenter.SetValue(CostCenter, MyBase.FieldsArrayList)
        Me.RecordStatus.SetValue(RecordStatus, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)
        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
